#include "userface.h"
#include "ui_userface.h"

userface::userface(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::userface)
{
    ui->setupUi(this);

}

userface::~userface()
{
    delete ui;
}

void userface::on_selectticketButton_clicked()//打开查询车票界面
{


                             this->hide();
                             selectticket*s=new selectticket();
                             connect(s,SIGNAL(sendsignal()),this,SLOT(reshow()));//当点击子界面时，调用主界面的reshow()函数
                             s->show();

}

void userface::on_selectorderButton_clicked()//打开查询我的订单界面
{
    this->hide();
        showorder*s=new showorder();


        connect(s,SIGNAL(sendsignal()),this,SLOT(reshow()));//当点击子界面时，调用主界面的reshow()函数
        s->show();
}

void userface::reshow()
{
    this->show();
}

void userface::on_exitButton_clicked()//退出按钮
{
    emit sendsignal();
        this->close();
}



void userface::on_slmyticketButton_clicked()//打开查询我的车票界面
{
    this->hide();
        showmyticket*s=new showmyticket();
        connect(s,SIGNAL(sendsignal()),this,SLOT(reshow()));//当点击子界面时，调用主界面的reshow()函数
        s->show();
}
